package com.sjgtw.cloud.system.api.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import com.sjgtw.cloud.common.core.constant.ServiceNameConstants;
import com.sjgtw.cloud.common.core.domain.R;
import com.sjgtw.cloud.system.api.domain.SysOperLog;
import com.sjgtw.cloud.system.api.fallbackfactory.RemoteLogFallbackFactory;

/**
 * <p>Title: 日志服务API</p>
 * <p>Description: </p>
 * @author Admin
 * @date 2021-4-7
 */
@FeignClient(contextId = "remoteLogService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteLogFallbackFactory.class)
public interface RemoteLogService
{
	/**
	 * <p>Title: 保存操作日志</p>
	 * <p>Description: </p>
	 * @param sysOperLog  日志实体
	 * @return
	 */
    @PostMapping("/operlog")
    R<Boolean> saveLog(@RequestBody SysOperLog sysOperLog);

    /**
     * <p>Title: 保存用户访问记录</p>
     * <p>Description: </p>
     * @param username 用户名称
     * @param status 状态
     * @param message 消息
     * @return
     */
    @PostMapping("/logininfor")
    R<Boolean> saveLogininfor(@RequestParam("username") String username, @RequestParam("status") String status,
            @RequestParam("message") String message);
}
